package com.daxt.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import com.daxt.model.search.ArchivesSearch;
import com.daxt.model.service.archives.vo.ArchivesType;
import com.daxt.model.service.base.result.UserInfo;
import org.springframework.web.bind.annotation.RequestBody;

import com.baomidou.mybatisplus.extension.service.IService;
import com.daxt.common.result.PageInfo;
import com.daxt.common.result.Result;
import com.daxt.model.service.archives.result.ArchivesDetails;
import com.daxt.model.service.archives.result.ArchivesDocResult;
import com.daxt.model.service.archives.result.ArchivesList;
import com.daxt.model.service.archives.vo.ArchivesDoc;

public interface DocService extends IService<ArchivesDoc>{
	
	/**
	 * 件 保存
	 * @param archivesDoc
	 * @return
	 */
	Result<String> docSave(@RequestBody ArchivesDoc archivesDoc);
	
//	/**
//	 * 件 列表
//	 * @param pageNum
//	 * @param pageSize
//	 * @param typeId
//	 * @param fondsId
//	 * @param dossierId
//	 * @param condition
//	 * @param state
//	 * @return
//	 */
//	Result<ArchivesList> list(Integer pageNum,Integer pageSize,String typeId,String fondsId, String dossierId,  String condition,String classId,String keywords,String fileType,String deptId,String state,String isDelete,String openState);

	/**
	 * @description: 件 列表   （重构）
	 *
	 * @author: lig
	 * @date: 2022/2/21
	 */
	Result<ArchivesList> list(Integer pageNum, Integer pageSize, ArchivesSearch archivesSearch);


//	//增加 分类数据权限  密集  by lig 2021-12-09
//	Result<ArchivesList> list(Integer pageNum,Integer pageSize,String extType,String fondsId, String dossierId,  String condition,String classId,String keywords,String fileType,String deptId,String state,String isDelete,String openState,String classIds,String secret);
	//增加 分类数据权限  密集  by lig 2021-12-09
//	Result<ArchivesList> list(Integer pageNum,Integer pageSize,String extType,String fondsId, String dossierId,  String condition,String classId,String keywords,String fileType,String deptId,String state,String isDelete,String openState,String classIds,String secret);

	Result<ArchivesList> useList(Integer pageNum,Integer pageSize,String extType,String fondsId, String dossierId,  String condition,String classNum,String keywords,String fileType,String deptId,String state,String isDelete,String openState,HttpServletRequest request);
	
	/**
	 * 件 修改
	 * @param archivesDoc
	 * @return
	 */
	Result<String> docEdit(ArchivesDoc archivesDoc);
	
	/**
	 * 件 详情
	 * @param archivesDoc
	 * @return
	 */
	Result<ArchivesDetails> details(ArchivesDoc archivesDoc);
	
	/**
	 * 打印件 列表
	 * @param ids
	 * @param typeNum
	 * @param fondsId
	 * @return
	 */
	List<Map<String,Object>> printGetDocInfo(List<Long> ids,String typeNum,String fondsId);

	List<Map<String, Object>> printGetDocInfoByDossierId(List<String> ids, String typeNum, String fondsId);

	Result<PageInfo<ArchivesDocResult>> conditionList(Integer pageNum, Integer pageSize, String extType, String fondsId,
			String classNum, String condition, String model, String state,HttpServletRequest request);

	// 增加密级参数   lig  2021-12-13
	Result<PageInfo<ArchivesDocResult>> keywordsList(Integer pageNum, Integer pageSize, String typeId, String fondsId, String classId, String keywords, String fileType, String state, String openState, UserInfo loginUser, String secret);

	Result<PageInfo<ArchivesDoc>> conditionListManager(Integer pageNum, Integer pageSize, String typeId, String fondsId,
			String classId, String condition, String model, String state);
	Result<PageInfo<ArchivesDoc>> keywordsListManager(Integer pageNum,Integer pageSize,String typeId,String fondsId,String classId,
			String keywords,String fileType,String state,String openState);

	/**
	 * @description: 查询关键词 条件门类
	 *
	 * @author: lig
	 * @date: 2021/7/9
	 */
	Result<PageInfo<ArchivesDoc>> keywordsTypesListManager(Integer pageNum, Integer pageSize,String typeName,
														   String keywords, String fileType, String state, String openState);

	Result<ArchivesDetails> useDetails(ArchivesDoc archivesDoc,HttpServletRequest request);


	List<ArchivesType> types(UserInfo userInfo);
}
